﻿
namespace WeixinSDK.Message
{
    [System.Xml.Serialization.XmlRoot("Music")]
    public sealed class ResMusic : ResData
    {
        /// <summary>
        /// 保证序列化实现
        /// </summary>
        private ResMusic() { }

        public ResMusic(string thumbMediaId)
        {
            this.ThumbMediaId = thumbMediaId;
        }

        /// <summary>
        /// [可选]音乐标题
        /// </summary>
        public CData Title { get; set; }

        /// <summary>
        /// [可选]音乐描述
        /// </summary>
        public CData Description { get; set; }

        /// <summary>
        /// [可选]音乐链接
        /// </summary>
        public CData MusicURL { get; set; }

        /// <summary>
        /// [可选]高质量音乐链接，WIFI环境优先使用该链接播放音乐
        /// </summary>
        public CData HQMusicUrl { get; set; }

        /// <summary>
        /// [必需]缩略图的媒体id，通过上传多媒体文件，得到的id
        /// </summary>
        public CData ThumbMediaId { get; set; }

        public override WxMsgType MsgType
        {
            get { return WxMsgType.music; }
        }
    }
}
